// created by noellynch
// May 6, 2009

package com.sceneworker.app.undo;

import com.jme.math.Vector3f;
import com.jme.scene.Spatial;

public class SpatialTranslationUndoAction extends SpatialUndoAction {

	protected	Vector3f		mcl_originalTx;
	
	public	SpatialTranslationUndoAction(Spatial cl_spatial, Vector3f cl_originalTx) {
		super(cl_spatial);
		
		mcl_originalTx = cl_originalTx;
	}
	
	@Override
	public void undo() {
		mcl_spatial.setLocalTranslation(mcl_originalTx);
		mcl_spatial.updateGeometricState(0, true);
	}

}
